<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 匹诺曹
  Date: 2023/12/15
  Time: 16:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>固废通</title>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/assets/libs/icheck/skins/all.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/assets/css/iconfont.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/assets/css/style.css">
    <style>
        #create {
            position: relative;
            left: 55px;
        }

        .form-group select {
            margin-left: 85px;
            width: 150px;
            text-align: center;
        }
    </style>
</head>

<body class="register-page">
<div class="login-bg">

</div>
<div class="register-wrapper">
    <div class="header skew">
    </div>
    <div class="register-logo">
        <a href="../../index.html">
            <strong>注册</strong>
        </a>
    </div>
    <div class="register-body">
        <p class="text-primary text-center">${error}</p>
        <div class="form">
            <form method="post" action="${pageContext.request.contextPath}/login/createUser">
                <div class="form-group">
                    <div class="input-group">
                    	<span class="input-group-addon">
                    		<i class="iconfont icon-login-user"></i>
                    	</span>
                        <input type="text" class="form-control" name="userLoginname" placeholder="请输入用户名">
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                		<span class="input-group-addon">
                			<i class="iconfont icon-lock"></i>
                		</span>
                        <input type="password" class="form-control" name="oldPwd" placeholder="请输入密码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-addon">
                            <i class="iconfont icon-input"></i>
                        </span>
                        <input type="password" class="form-control" name="userPwd" placeholder="再输入一次密码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="input-group pull-right">
                                <button type="submit" id="create" class="btn btn-primary">创建账号</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            <p class="text-center">
                已有账号,<a href="${pageContext.request.contextPath}/static/pages/login">前往登录</a>
            </p>
        </div>
    </div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/assets/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/assets/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/assets/js/bootstrap.min.js"></script>
<!-- icheck.js -->
<script type="text/javascript"
        src="${pageContext.request.contextPath}/static/assets/libs/icheck/icheck.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/assets/js/alpha.js"></script>
<script type="text/javascript">
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    })
</script>
</body>
<script>
    $(function () {

    })

    /*确认两次密码是否一致*/
    $("[name='userPwd']").blur(function () {
        var oldPwd = $("[name='oldPwd']").val();
        var userPwd = $(this).val();
        if (oldPwd != userPwd) {
            alert("两次输入密码不一致")
        }
    })


</script>
</html>
